import Vue from "vue"
import App from "./App.vue"
import router from "./router"
import store from "./store"
import MetaInfo from 'vue-meta-info';
import 'vue-photo-preview/dist/skin.css'
let options = {
  fullscreenEl: false
};
import './untils/appback'
Vue.use(MetaInfo);
// 引入vantui
import Vant from "vant"
import "vant/lib/index.css"


Vue.use(Vant)
// 引入Axios
import "./untils/axios"
// 引入footer组件
import Foot from "./components/Foot.vue"
Vue.component("foot", Foot)
// 引入empty组件
import Empty from './components/Empty/Empty.vue'
Vue.component("empty",Empty)
// 在Vue对象原型声明EventBus
Vue.prototype.$eventBus = new Vue()
//引入element-ui

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
//日期工具
var moment = require('moment');
Vue.prototype.moment=moment;

//引入全局组件的骨架
// import Gujia from "./components/Skeleton_screen/Skeleton _screen.vue"
// Vue.component("gujia", Gujia)
Vue.config.productionTip = false

import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
Vue.use(preview)
import 'viewerjs/dist/viewer.css'
  import Viewer from 'v-viewer'
  Vue.use(Viewer)
  Vue.use(preview, options)
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount("#app")

// 全局路由守卫
// router.beforeEach((to, from, next) => {
//   if (to.path == "/usercenter") return next()
//   const tokenStr = localStorage.getItem("token")
//   if (!tokenStr) return next("/usercenter")
//   next()
// })
